package org.eenie.commonlib.ui.launch;

import android.content.Intent;
import android.view.View;

import com.eenie.common.base.BaseActivity;
import com.eenie.common.base.WinMode;

import org.eenie.commonlib.App;
import org.eenie.commonlib.R;
import org.eenie.commonlib.ui.MainActivity;
import org.eenie.commonlib.ui.splash.SplashActivity;

public class LauncherActivity extends BaseActivity {


    @Override
    public int initContentView() {
        return R.layout.activity_launcher;
    }

    @Override
    public void initInjector() {
        setWinMode(WinMode.IMMERSE);
        getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
                | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
                | View.SYSTEM_UI_FLAG_LAYOUT_STABLE
                | View.SYSTEM_UI_FLAG_IMMERSIVE);
        if (((App) getApplication()).isRunning()) {
            startActivity(new Intent(this, MainActivity.class));
        } else {
            startActivity(new Intent(this, SplashActivity.class));
        }
        finish();
    }

    @Override
    public void initUiAndListener(View view) {

    }
}
